﻿@model DotNetUniLodz.Models.Article

@{
    ViewBag.Title = Model.Article_title;
}

<article id="MainArticle">
    <header>
        @Html.ActionLink(Model.Article_title, "Details", "Articles", new { id = Model.Article_id }, null)
    </header>
    <div id="newsContent">
        <img src="~/@{ 
            if (Model.File != null)
            {
               @Model.File.File_path
            }
            else
            {
                Write("Images/Uploads/brak.png");
            }}" alt="@Model.Article_title" />

        @Html.Partial("_DisplayNewsInfo", Model)

        @Html.Raw(Model.Article_text)
        <footer>
            @{
                if (Model.Event_id != null)
                {                    
                <a href="@Model.Event.Event_link" target="_blank" class="ArticleRegister">@Model.Event.Event_name</a>
                }            
            }
        </footer>
    </div>
</article>

<p>
    @if (User.IsInRole("Admin"))
    {
        @Html.ActionLink("Edytuj", "Edit", new { id = Model.Article_id }, new { @class = "SuperLink" })
        @Html.ActionLink("Usuń", "Delete", new { id = Model.Article_id }, new { @class = "SuperLink" })
    }
</p>

<div id="disqus_thread"></div>
<script type="text/javascript">
    /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
    var disqus_shortname = 'grupanet'; // required: replace example with your forum shortname

    /* * * DON'T EDIT BELOW THIS LINE * * */
    (function () {
        var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
        dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
    })();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">System komentarzy to <span class="logo-disqus">Disqus</span></a>

